package com.zhentao.controller;

import com.zhentao.login.service.TUserRoleService;
import com.zhentao.nlz.project.dto.UserRoleDto;
import com.zhentao.nlz.project.login.TUserRole;
import com.zhentao.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.parameters.P;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@RestController
@RequestMapping("userrole")
public class TuserRoleController {
    @Autowired
    private TUserRoleService tUserRoleService;
    @PostMapping("saveuserrole")
    public Result saveuserrole(@RequestBody UserRoleDto userRoleDto){
        userRoleDto.setCreateTime(new Date());
        boolean saveuserrole = tUserRoleService.saveuserrole(userRoleDto);
        return Result.success(saveuserrole);
    }
}
